program MemoPad;

{ Reduce EXE size by disabling as much of RTTI as possible (delphi 2009/2010) }
{$IF CompilerVersion >= 21.0}
{$WEAKLINKRTTI ON}
{$RTTI EXPLICIT METHODS([]) PROPERTIES([]) FIELDS([])}
{$IFEND}

uses
  Forms,
  Windows,
  UnitMain in 'UnitMain.pas' {HostForm},
  UnitMemo in 'UnitMemo.pas' {MemoForm},
  UnitGlobal in 'UnitGlobal.pas',
  UnitManager in 'UnitManager.pas';

{$R *.res}

var
  H: HWND;

begin
  Application.Initialize;
  Application.MainFormOnTaskbar := True;
  Application.ShowMainForm := False;
  Application.Title := 'Memo Pad';
  H := FindWindow('THostForm', 'Memo Pad');
  if H > 0 then
    SendMessage(H, WM_SAYHELLO, 0, 0)
  else
    Application.CreateForm(THostForm, HostForm);
  Application.Run;
end.
